<template>
  <div class="itemWrapper">
    <div style="display: flex">
      <el-checkbox @change="changeHandler" size="large"></el-checkbox>
      
    </div>
  </div>
</template>

<script lang="ts">
import {
  defineComponent,
} from "vue";
export default defineComponent({
  name: "item",
  props: ['item'],
  setup(prop,{ attrs, slots, emit }){
    // let item = prop
    // console.log(item,'item');
    
    function changeHandler(e: any) :void{
      console.log(e); // 当前状态
      // 传递给父告诉更改了
      emit('changeIsDone',prop.item)

      
    }

    return {
      changeHandler
      // item
    }
  }
});
</script>

<style scoped>
</style>